﻿using System;
using System.Collections.Generic;

namespace Wrox.ProCSharp.Delegates
{
    class Program
    {
        static void Main()
        {
            ////IList<Employee> employees;
            //employees.Add("Bugs Bunny", 20000);
            Employee[] employees =
            {
                new Employee("Bugs Bunny", 20000,95),
                new Employee("Elmer Fudd", 10000,65),
                new Employee("Daffy Duck", 25000,17),
                new Employee("Wile Coyote", 1000000.38m,84),
                new Employee("Foghorn Leghorn", 23000,91),
                new Employee("RoadRunner", 50000,50)
            };

            BubbleSorter.Sort(employees, Employee.CompareSalary);

            foreach (var employee in employees)
            {
                Console.WriteLine(employee);
            }
        }
    }
}
